|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectraar.process.RAProcess
raar.process.sensor.RASensor
RASensor defines the sensors of an agent.
| Field Summary | |
java.util.Vector |
emulateRegisterNames
DO NOT CHANGE; PUBLIC DUE TO JAVA COMPILER BUG. |
java.util.Vector |
emulateRegisterObjects
DO NOT CHANGE; PUBLIC DUE TO JAVA COMPILER BUG. |
RADataType |
output
DO NOT CHANGE; PUBLIC DUE TO JAVA COMPILER BUG. |
java.lang.String |
outputName
DO NOT CHANGE; PUBLIC DUE TO JAVA COMPILER BUG. |
| Fields inherited from class raar.process.RAProcess |
hasRun, inregister, outregister, register, sourceCode, statement |
| Constructor Summary | |
RASensor(java.lang.String outputName,
RADataType outputType,
RAAgent agent)
Constructor. |
|
| Method Summary | |
boolean |
acceptsInput(RADataType b,
java.lang.String n)
The sensor accepts no input at all. |
void |
dumpRegisters()
Give a System.out dump of the current content. |
void |
execute()
Executing the sensor is illegal and will produce an error. |
abstract java.lang.String |
explain()
Give a String that explains what the sensor does. |
RADataType |
get(java.lang.String key)
Get a specific key's value from the output register. |
RAAgent |
getAgent()
Get sensor's agent. |
java.awt.Color |
getColor()
Colour representation. |
RADataType |
getDataType(java.lang.String name)
Returns the datatype for a given name. |
java.util.Vector |
getInputNames()
A sensor does not have any inputs and will return null. |
java.util.Vector |
getInputObjects()
A sensor does not have any inputs and will return null. |
java.util.Vector |
getOutputNames()
Get a String vector containing the names of the keys the output register stores (in order). |
java.util.Vector |
getOutputObjects()
Get an RADataType vector containing the current content of the output register. |
RADataType |
getSensorValue()
Returns the RADataType currently stored in the sensor. |
boolean |
isSpecial()
The sensor is a special process and will return true. |
abstract void |
run()
Run the sensor (abstract). |
void |
set(java.lang.String key,
RADataType value)
Setting values from the outside is illegal and will produce an error. |
void |
setAgent(RAAgent a)
Set sensor's agent. |
protected void |
setOutput()
Recreate the output registers. |
void |
setSourceCode(java.lang.String code)
Setting the process source code is illegal and will produce an error. |
boolean |
suppliesOutput(RADataType b,
java.lang.String n)
See whether the sensor supplies a certain output. |
abstract java.lang.String |
toString()
String representation. |
| Methods inherited from class raar.process.RAProcess |
clone, getProcessName, getSourceCode, reset, setProcessName |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public java.lang.String outputName
public RADataType output
public java.util.Vector emulateRegisterNames
public java.util.Vector emulateRegisterObjects
| Constructor Detail |
public RASensor(java.lang.String outputName,
RADataType outputType,
RAAgent agent)
| Method Detail |
public void setSourceCode(java.lang.String code)
throws RAException
setSourceCode in class RAProcessRAException
public void execute()
throws RAException
execute in class RAProcessRAException
public abstract void run()
throws RAException
run in class RAProcessRAExceptionpublic void dumpRegisters()
dumpRegisters in class RAProcess
public void set(java.lang.String key,
RADataType value)
throws RAException
set in class RAProcessRAException
public RADataType get(java.lang.String key)
throws RAException
get in class RAProcessRAException
public RADataType getDataType(java.lang.String name)
throws RAException
getDataType in class RAProcessRAExceptionpublic java.util.Vector getOutputNames()
getOutputNames in class RAProcesspublic java.util.Vector getOutputObjects()
getOutputObjects in class RAProcesspublic java.util.Vector getInputNames()
getInputNames in class RAProcesspublic java.util.Vector getInputObjects()
getInputObjects in class RAProcesspublic RADataType getSensorValue()
public boolean isSpecial()
isSpecial in class RAProcessprotected void setOutput()
public void setAgent(RAAgent a)
public RAAgent getAgent()
public boolean acceptsInput(RADataType b,
java.lang.String n)
acceptsInput in class RAProcess
public boolean suppliesOutput(RADataType b,
java.lang.String n)
suppliesOutput in class RAProcesspublic abstract java.lang.String toString()
public abstract java.lang.String explain()
public java.awt.Color getColor()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||